﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.customer.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.customer.dao.*;
import com.hh.bss.customer.entity.*;
import com.hh.bss.customer.service.*;
import com.hh.bss.customer.vo.query.*;
import com.hh.bss.util.*;





public class Company extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Company";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_FULL_NAME = "fullName";
	public static final String ALIAS_INDUSTRY = "industry";
	public static final String ALIAS_PROPERTY = "property";
	public static final String ALIAS_TYPE = "type";
	public static final String ALIAS_TEL = "tel";
	public static final String ALIAS_WEBSITE = "website";
	public static final String ALIAS_LOCATION = "location";
	public static final String ALIAS_ADDRESS = "address";
	public static final String ALIAS_POSTCODE = "postcode";
	public static final String ALIAS_PROFILE = "profile";
	public static final String ALIAS_JOB_PROFILE = "jobProfile";
	public static final String ALIAS_CAPITAL = "capital";
	public static final String ALIAS_BACKGROUND = "background";
	public static final String ALIAS_PRODUCT = "product";
	public static final String ALIAS_PRODUCT_LEVEL = "productLevel";
	public static final String ALIAS_REG_CAPITAL = "regCapital";
	public static final String ALIAS_SIZE = "size";
	public static final String ALIAS_CULTURE = "culture";
	public static final String ALIAS_COMPETE_COMPANYS = "competeCompanys";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	public static Integer DELETE_FLAG=new Integer(1);
	//date formats
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	public static final String FORMAT_MODIFIED_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	@NotBlank @Length(max=100)
	private java.lang.String name;
	@Length(max=255)
	private java.lang.String fullName;
	@NotNull 
	private java.lang.Integer industry;
	@NotNull 
	private java.lang.Integer property;
	@NotNull 
	private java.lang.Integer type;
	@Length(max=20)
	private java.lang.String tel;
	@Length(max=100)
	private java.lang.String website;
	
	private java.lang.Integer location;
	@Length(max=200)
	private java.lang.String address;
	@Length(max=6)
	private java.lang.String postcode;
	@Length(max=200)
	private java.lang.String profile;
	@Length(max=65535)
	private java.lang.String jobProfile;
	@Length(max=65535)
	private java.lang.String capital;
	@Length(max=65535)
	private java.lang.String background;
	@Length(max=65535)
	private java.lang.String product;
	@Length(max=65535)
	private java.lang.String productLevel;
	@Length(max=255)
	private java.lang.String regCapital;
	
	private java.lang.Integer size;
	@Length(max=65535)
	private java.lang.String culture;
	@Length(max=255)
	private java.lang.String competeCompanys;
	@Length(max=50)
	private java.lang.String creator;
	
	private java.util.Date createDt;
	@Length(max=50)
	private java.lang.String modifier;
	
	private java.util.Date modifiedDt;
	private String fax;
    private String abbrName;
    /**公司信息完整度*/
    private String integrity;
    private java.lang.Integer isDelete=new Integer(0);
    
    private java.util.Date deleteDt;
     
    public java.util.Date getDeleteDt() {
		return deleteDt;
	}

	public void setDeleteDt(java.util.Date deleteDt) {
		this.deleteDt = deleteDt;
	}

	public java.lang.Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(java.lang.Integer isDelete) {
		this.isDelete = isDelete;
	}

	public String getIntegrity() {
		return integrity;
	}

	public void setIntegrity(String integrity) {
		this.integrity = integrity;
	}

	public String getAbbrName() {
		return abbrName;
	}

	public void setAbbrName(String abbrName) {
		this.abbrName = abbrName;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public Company(){
	}

	public Company(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setFullName(java.lang.String value) {
		this.fullName = value;
	}
	
	public java.lang.String getFullName() {
		return this.fullName;
	}
	public void setIndustry(java.lang.Integer value) {
		this.industry = value;
	}
	
	public java.lang.Integer getIndustry() {
		return this.industry;
	}
	public void setProperty(java.lang.Integer value) {
		this.property = value;
	}
	
	public java.lang.Integer getProperty() {
		return this.property;
	}
	public void setType(java.lang.Integer value) {
		this.type = value;
	}
	
	public java.lang.Integer getType() {
		return this.type;
	}
	public void setTel(java.lang.String value) {
		this.tel = value;
	}
	
	public java.lang.String getTel() {
		return this.tel;
	}
	public void setWebsite(java.lang.String value) {
		this.website = value;
	}
	
	public java.lang.String getWebsite() {
		return this.website;
	}
	public void setLocation(java.lang.Integer value) {
		this.location = value;
	}
	
	public java.lang.Integer getLocation() {
		return this.location;
	}
	public void setAddress(java.lang.String value) {
		this.address = value;
	}
	
	public java.lang.String getAddress() {
		return this.address;
	}
	public void setPostcode(java.lang.String value) {
		this.postcode = value;
	}
	
	public java.lang.String getPostcode() {
		return this.postcode;
	}
	public void setProfile(java.lang.String value) {
		this.profile = value;
	}
	
	public java.lang.String getProfile() {
		return this.profile;
	}
	public void setJobProfile(java.lang.String value) {
		this.jobProfile = value;
	}
	
	public java.lang.String getJobProfile() {
		return this.jobProfile;
	}
	public void setCapital(java.lang.String value) {
		this.capital = value;
	}
	
	public java.lang.String getCapital() {
		return this.capital;
	}
	public void setBackground(java.lang.String value) {
		this.background = value;
	}
	
	public java.lang.String getBackground() {
		return this.background;
	}
	public void setProduct(java.lang.String value) {
		this.product = value;
	}
	
	public java.lang.String getProduct() {
		return this.product;
	}
	public void setProductLevel(java.lang.String value) {
		this.productLevel = value;
	}
	
	public java.lang.String getProductLevel() {
		return this.productLevel;
	}
	public void setRegCapital(java.lang.String value) {
		this.regCapital = value;
	}
	
	public java.lang.String getRegCapital() {
		return this.regCapital;
	}
	public void setSize(java.lang.Integer value) {
		this.size = value;
	}
	
	public java.lang.Integer getSize() {
		return this.size;
	}
	public void setCulture(java.lang.String value) {
		this.culture = value;
	}
	
	public java.lang.String getCulture() {
		return this.culture;
	}
	public void setCompeteCompanys(java.lang.String value) {
		this.competeCompanys = value;
	}
	
	public java.lang.String getCompeteCompanys() {
		return this.competeCompanys;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setModifier(java.lang.String value) {
		this.modifier = value;
	}
	
	public java.lang.String getModifier() {
		return this.modifier;
	}
	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_MODIFIED_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_MODIFIED_DT,java.util.Date.class));
	}
	
	public void setModifiedDt(java.util.Date value) {
		this.modifiedDt = value;
	}
	
	public java.util.Date getModifiedDt() {
		return this.modifiedDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Name",getName())
			.append("FullName",getFullName())
			.append("Industry",getIndustry())
			.append("Property",getProperty())
			.append("Type",getType())
			.append("Tel",getTel())
			.append("Website",getWebsite())
			.append("Location",getLocation())
			.append("Address",getAddress())
			.append("Postcode",getPostcode())
			.append("Profile",getProfile())
			.append("JobProfile",getJobProfile())
			.append("Capital",getCapital())
			.append("Background",getBackground())
			.append("Product",getProduct())
			.append("ProductLevel",getProductLevel())
			.append("RegCapital",getRegCapital())
			.append("Size",getSize())
			.append("Culture",getCulture())
			.append("CompeteCompanys",getCompeteCompanys())
			.append("Creator",getCreator())
			.append("CreateDt",getCreateDt())
			.append("Modifier",getModifier())
			.append("ModifiedDt",getModifiedDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Company == false) return false;
		if(this == obj) return true;
		Company other = (Company)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

